package com.xingkeduo.dto.transter.hairstyleDetails;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.xingkeduo.dto.HairstyleDetailResponseDTO;
import com.xingkeduo.dto.HairstyleResponseDTO;
import lombok.Data;

import java.util.List;

@Data
public class Hair {
    private String id;
    private String name;
    private String sex;
    @JsonProperty("like_num")
    private String likeNum;
    @JsonProperty("hairsytle_label")
    private String hairsytleLabel;
    @JsonProperty("english_sign")
    private String englishSign;
    @JsonProperty("hairstyle_introduction")
    private String hairstyleIntroduction;
    @JsonProperty("face_list")
    private List<String> faceList;
    private int version = 1 ;
    @JsonProperty("is_barber")
    private boolean isBarber = false;

    public void cover(HairstyleDetailResponseDTO hairstyleData){

        this.id = String.valueOf(hairstyleData.getId());
        this.name = hairstyleData.getName();
        this.sex = String.valueOf(hairstyleData.getSex());
        this.likeNum = String.valueOf(hairstyleData.getLikeNum());
//        this.hairsytleLabel = hairstyleData.getHairstyleTags().size()>0?hairstyleData.getHairstyleTags().get(0):"";
        this.hairsytleLabel = hairstyleData.getTitle();
        this.englishSign = hairstyleData.getEnmark();
        this.hairstyleIntroduction = hairstyleData.getIntro();
        this.faceList = hairstyleData.getFaceTags();
    }




}
